package bank;

public class CustomerTest {
    public static void main(String[] args) {
        Customer JS = new Customer("Jane", "Smith");
        Account JSAccount = new Account(1000, 2000, 1.23);
        JS.setAccount(JSAccount);
        JS.getAccount().deposit(100);
        JS.getAccount().withdraw(960);
        JS.getAccount().withdraw(2000);
//        打印 "%"，要写成"%%"
        System.out.printf("bank.Customer [%s, %s] has a account: id is %d, annualInterestRate is %.2f%%, balance is %.1f",
                JS.getFirstName(), JS.getLastName(), JS.getAccount().getId(), JS.getAccount().getAnnualInterestRate(),
                JS.getAccount().getBalance());
    }
}
